#ifndef CHARLOADER
#define CHARLOADER

#include <allegro.h>
#include "../include/xmlparser.h"
#include "../include/global.h"

typedef struct protagonist {
    int posx, posy;             /* Actual position */
    int state;                  /* Idle=0, walk=1 */
    int direction;              /* left=0, right=1, up=2, down=3 */
    int frameCur;               /* Current anim frame */
    int frameSizeX, frameSizeY; /* FrameSize is the size of each frame in the sprite sheet */
} protagonist;

image * imgChar;
protagonist * indy;

int char_load(char * characternumber);
void char_animation();
void char_timer(int speed);
void char_cleanup();

#endif
